<?php

/**
 * Talis Aspire Lists block
 *
 * @package     block
 * @subpackage  aspirelists
 * @copyright   2011 Lancaster University Network Services Limited
 * @license     http://www.gnu.org/licenses/lgpl.html GNU LGPL
 * @author      Andrew Nicols <andrew.nicols@luns.net.uk>
 */

defined('MOODLE_INTERNAL') || die;

if ($ADMIN->fulltree) {
    // Set the Talis Aspire URL
    $config = new admin_setting_configtext('targetaspire',
            get_string('targetaspire', 'block_aspirelists'),
            get_string('targetaspire_description', 'block_aspirelists'), '', PARAM_URL
    );
    $config->plugin = 'blocks/aspirelists';
    $settings->add($config);

    // The 'Knowledge Group'
    $options = array();
    $options['modules'] = get_string('knowledgegroup_modules', 'block_aspirelists');
    $options['courses'] = get_string('knowledgegroup_courses', 'block_aspirelists');
    $options['units'] = get_string('knowledgegroup_units', 'block_aspirelists');
    $options['programmes'] = get_string('knowledgegroup_programmes', 'block_aspirelists');
    $options['subjects'] = get_string('knowledgegroup_subjects', 'block_aspirelists');
    $config = new admin_setting_configselect('knowledgegroup',
            get_string('knowledgegroup', 'block_aspirelists'),
            null, 'modules', $options
    );
    $config->plugin = 'blocks/aspirelists';
    $settings->add($config);
}
